package com.newear.util;

import android.content.Context;
import android.widget.Toast;

/**
 * 默认弹框Toast
 * Created by josan on 2016/07/12.
 */
public class T {

    /**
     * @param context
     * @param message
     */
    public static void shortToast(Context context, String message) {
        if (Validator.isEffective(message)) {
            try {
                Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
            }catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    /**
     * @param context
     * @param message
     */
    public static void longToast(Context context, String message) {
        if (Validator.isEffective(message)) {
            try {
                Toast.makeText(context, message, Toast.LENGTH_LONG).show();
            }catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
